CREATE TABLE [dbo].[Models]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[BrandId] [int] NOT NULL,
[Name] [nvarchar] (500) COLLATE Cyrillic_General_CI_AS NOT NULL,
[Active] [bit] NOT NULL
)
GO
ALTER TABLE [dbo].[Models] ADD CONSTRAINT [PK_Models] PRIMARY KEY CLUSTERED  ([Id])
GO
ALTER TABLE [dbo].[Models] ADD CONSTRAINT [FK_Models_Brands] FOREIGN KEY ([BrandId]) REFERENCES [dbo].[Brands] ([Id])
GO
